-- interfere_device
-- Created by panyl
-- 地牢格子：电流干扰装置

return {
    restoreGrid = function(grid, info)
        if info.magic_stone then
            local magic_stone = info.magic_stone;

            magic_stone["pos"] = grid:getPos();

            ME.user.dbase:setTemp("magic_stone", magic_stone);

            grid.id = magic_stone["id"];
        end
    end,

    -- 收集上下文
    collectContext = function(grid)
        local ret = {};

        ret.magic_stone = ME.user.dbase:queryTemp("magic_stone");
        return ret;
    end,
};
